home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
272_01
/
iscons.doc
< prev
next >
Wrap
Text File
|
1987-07-15
|
808b
|
39 lines
NAME
iscons -- is file descriptor the console
SYNOPSIS
r = iscons(fd);
int r; TRUE or FALSE returned
FILE *fd; file descriptor to check
DESCRIPTION
The specified file descriptor is tested to see if it refers
to the console device. TRUE (not 0)
is returned if it does, and FALSE (0) otherwise.
This is a test primarily aimed at detecting if stdin or
stdout have been redirected away from the default console.
EXAMPLE
if(iscons(stdin)) puts("stdin is the keyboard");
else ("stdin is probably a file");
This function is found in SMDLx.LIB for the Datalight Compiler